import QtQuick
import QtQuick.Controls

Window {
    width: 640
    height: 480
    visible: true
    title: qsTr("Tumbler基础示例")

    /*
    Tumbler {
        anchors.centerIn: parent
        model: 10  // 显示0-9的数字
    }
    */

    /*
    Tumbler {
        anchors.centerIn: parent
        model: ["January", "February", "March", "April", "May", "June",
                "July", "August", "September", "October", "November", "December"]
        onCurrentIndexChanged: console.log("Selected:", model[currentIndex])
    }
    */

    Row {
        spacing: 20
        anchors.centerIn: parent

        Tumbler {
            id: hoursTumbler
            model: 24
            currentIndex: 12
        }

        Tumbler {
            id: minutesTumbler
            model: 60
        }

        Tumbler {
            id: amPmTumbler
            model: ["AM", "PM"]
        }
    }
}
